﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace ifunction.BaiduBCS.SDK
{
    /// <summary>
    /// Class StorageObjectDownloadRequest.
    /// </summary>
    [DataContract]
    public class StorageObjectDownloadRequest : StorageObjectIdentity
    {
        /// <summary>
        /// Gets or sets the version.
        /// If this is set, then the object would be returned only when the version string is matched.
        /// </summary>
        /// <value>The version.</value>
        [DataMember]
        public string Version
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the MD5 match.
        /// If this is set and it matches the value in cloud,  you would get HTTP status 302.
        /// </summary>
        /// <value>The m d5 match.</value>
        [DataMember]
        public string MD5Match
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the data range.
        /// e.g.: 0-5
        /// </summary>
        /// <value>The data range.</value>
        [DataMember]
        public string DataRange
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the name of the download file.
        /// This would override the value which is set when uploaded.
        /// </summary>
        /// <value>The name of the download file.</value>
        [DataMember]
        public string DownloadFileName
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the type of the content.
        /// This would override the value which is set when uploaded.
        /// </summary>
        /// <value>The type of the content.</value>
        [DataMember]
        public string ContentType
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the expired stamp.
        /// This would override the value which is set when uploaded.
        /// </summary>
        /// <value>The expired stamp.</value>
        [DataMember]
        public DateTime? ExpiredStamp
        {
            get;
            set;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="StorageObjectDownloadRequest"/> class.
        /// </summary>
        public StorageObjectDownloadRequest()
            : base()
        {

        }
    }
}
